package ink.xiaobaibai.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import ink.xiaobaibai.entity.BuyTimedTask;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xiaobaibai
 * @since 2021-06-14
 */
public interface BuyTimedTaskDao extends BaseMapper<BuyTimedTask> {

    @Select("SELECT t.* FROM buy_timed_task t LEFT JOIN buy_ozone_device ud ON ud.`id`=t.`device_id` WHERE ud.`can_use`=1 AND t.open=1")
    public List<BuyTimedTask> getCanUseDeviceTimedTask();

}
